home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.lang.java
- Path: uu4news.netcom.com!amc-gw!curtis
- From: curtis@amc.com (Curtis Green)
- Subject: Re: Java: What's the Big Deal?
- Message-ID: <1996Mar20.154600.12011@amc.com>
- Organization: Applied Microsystems Corporation
- X-Newsreader: TIN [version 1.1 PL6]
- References: <milodDoF9JF.K32@netcom.com>
- Date: Wed, 20 Mar 1996 15:46:00 GMT
-
- John DiCamillo (milod@netcom.com) wrote:
- : pete@borland.com (Pete Becker) writes:
- :
- : >There's no reason you can't write a C++ compiler that generates a Java
- : >bytestream.
- :
- : Are you claiming that arbitrary, correct (ANSI) C++ code can
- : be compiled to the JVM and continue to work correctly? Or are
- : you claiming that a compiler can be written that will translate
- : some limited subset of C++ into JVM?
-
- you would just need a proper backend to do the translation into a JAVA virtual
- machine compatible bytestream
- :
- : And even if it is the former, given the limitations of the JVM,
- : I suspect that the performance characteristics of the resulting
- : program might be unrecognizable to the author.
- :
- : >>2) No header files => faster compilation
- :
- : >Nonsense. Header files are simply text that gets included where you want it. If
- : >you write the same code without header files it will not magically compile
- : >faster.
- :
- : It's not nonsense. Cascaded #includes result in such a
- : drastic inflation of the source text that it makes a measurable
- : increase in compilation time.
- If you surround your header file with #ifndef .. #endif you should be able
- to eliminate your cascaded #include problem
- foo.h
- #ifndef FOO_H
- #define FOO_H
- ...
- #endif
-
- :
- : >>3) Slightly simpler syntax (mostly due to the lack of
- : >> address operators, function pointers, and templates)
- :
- : >Yup. The question, of course, is what this does to the expressive power of the
- : >language.
- :
- : That's strange, I thought the question was "what can you do
- : in Java that you can't do in C++", not the other way around.
- : And, as I said, points 1 through 4 are practical advantages,
- : not critical differences.
- :
- : In any case, no one can answer your question until you define
- : what you mean by "expressive power".
-
- overloaded operators, pointers, function pointers, templates ...
- in fact, I miss overloaded operators and overloaded functions in Delphi.
- Though I can get along without them, I feel my hands are tied.
- :
-
- --
- Be seeing you...
-
- Curtis Green | Software Engineer
- curtis@amc.com | Applied Microsystems Embedded Systems
- | http://www.amc.com
- My opinions are |
- expressly mine | This year Khan escapes Earth on the Botany Bay.
- on my own. | (Cliff Clavin, 1996)
-